package com.itheima.date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class datetest01 {
    public static void main(String[] args) throws ParseException {
        Date date=new Date(0L);
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
      String s= sdf.format(date);
        System.out.println(s);
        System.out.println(sdf.parse(s));
    }
}
